//
//  BCCustomerOnlineController.m
//  GSBlockChain
//
//  Created by guoshikeji_a on 2019/1/11.
//  Copyright © 2019 guoshikeji. All rights reserved.
//

#import "BCCustomerOnlineController.h"

@interface BCCustomerOnlineController ()

@end

@implementation BCCustomerOnlineController

- (UIStatusBarStyle)preferredStatusBarStyle {
    return UIStatusBarStyleLightContent;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setBarStyle];
    //
    [self loadRequestWithURL:[NSURL URLWithString:self.sms_url]];
    
    //
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackgroundNotification) name:UIApplicationDidEnterBackgroundNotification object:nil];
}
- (void)setBarStyle {
    self.customNaviBar.backgroundColor = [UIColor darkMainColor];
    [self.customNaviBar.leftButton setImage:nil forState:UIControlStateNormal];
    self.customNaviBar.rightButton.alpha = 1;
    
}


// 当main frame导航完成时，会回调
- (void)webView:(WKWebView *)webView didFinishNavigation:(null_unspecified WKNavigation *)navigation {
    [super webView:webView didFinishNavigation:navigation];
    //
    self.customNaviBar.rightButton.alpha = 1;
}




#pragma mark -
- (void)applicationDidEnterBackgroundNotification {
    [self didClickedNaviRightButton];
}



- (void)dealloc {
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}

@end
